import {createRouter, createWebHistory} from 'vue-router'

import Layout from '../views/Layout/Index.vue'


const routes = [
	{
		path: '/login',
		name: 'Login',
		component: () => import('../views/Login.vue')
	},

	{
		path: '/',
		component: Layout,
		children: [
			{
				path: '/workbench',
				component: () => import('../views/Dashboard/Workbench.vue')
			},
			{
				path: '/createds',
				component: () => import('../views/DataSource/CreateDbConn.vue')
			},
			{
				path: '/dslist',
				component: () => import('../views/DataSource/DataSourceList.vue')
			},
			{
				path: '/analysis',
				component: () => import('../views/DataAnalysis/DataAnalysis.vue')
			},
			{
				path: '/profile',
				component: () => import('../views/Profile/Profile.vue')
			}
		]
	}


];

const router = createRouter({
	history: createWebHistory(process.env.BASE_URL),
	routes
});

export default router
